<?php require_once 'source.php';?>
<?php require_once 'config.php';?>
<?php require_once 'dao/dao_db.php';?>
<?php ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo SYSTITLE?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/datepicker/WdatePicker.js"></script>
</head>
<body>
<div class="wrapper">
<?php require_once 'header.php';?>
<?php 
	if($_SESSION['level']!=STUDENT){
		header("LOCATION:error.php?errcode=2");
	}
?>
<div id="layout">
	<div id="leftlay"><?php require_once 'leftnav.php';?></div>
	<div id="rightlay">
		<div class="columntitle"><?php echo THESISMANAGE?></div>
		<div class="columncontent">
			<div id="news">
			<?php 
				if(isset($_GET['errcode'])||isset($_GET['msgcode'])){
					if(isset($_GET['errcode'])&&$_GET['errcode']==1){$msg=SOMETHINGISNULL;}
					elseif(isset($_GET['msgcode'])&&$_GET['msgcode']==1){$msg=THESISCOMMITTED;}
			?>
			<div style="">
				<span style="color:red"><?php echo $msg?></span>
			</div>
			<?php 
				}
			?>
				<form action="service/service_save_thesis.php" method="post">
					<div id="thesisinfo">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<th><?php echo THESISTITLE?></th>
								<td><input type="text" name="thesistitle" value="" size="40"/></td>
							</tr>
							<tr>
								<th><?php echo PUBLISHPLACE?></th>
								<td><input type="text" name="publishplace" value="" size="40"/></td>
							</tr>
							<tr>
								<th><?php echo PUBLISHDATE?></th>
								<td><input type="text" name="publishdate" onfocus="WdatePicker({ereadOnly:true,isShowClear:false})" class="Wdate" readonly="readonly" value="<?php echo date("Y-m-d");?>" size="9" readonly="readonly"/></td>
							</tr>
							<tr>
								<th><?php echo SEARCHCODE?></th>
								<td><input type="text" name="searchcode" value="" size="15"/></td>
							</tr>
						</table>
					</div>
					<div id="submit"><input type="submit" value="<?php echo SUBMIT?>"/></div>
				</form>
			</div>
		</div>
	</div>
</div>
</div>
</body>
</html>
